import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

// 428570
public class P71 {
	public static void main(String[] args) {
		int x = 1000000;
		//int x = 8;
		double target = (double) 3/ (double) 7;
		double min = Integer.MAX_VALUE;
		
		final Map<String, Double> m = new HashMap<String, Double>();
		
		for (int i = 1; i <= x; i++) {
			int start = (int) Math.floor((double) 3 * i / (double)7);
			
			for (int j = start; j < i; j++) {
				//System.out.println(j + "/" + i);
				double value = (double)j/(double)i;
				
				if (value > target) {
					break;
				}
				
				double diff = target - value;
				if (diff == 0) {
					continue;
				}
				
				if (min < diff) {
					continue;
				} else if (min > diff) {
					min = diff;
				}
								
				long[] f = Util.reduce(j, i);
				System.out.println(f[0] + "/" + f[1] + ":" + min);
				m.put(f[0] + "/" + f[1], value);
			}
			//System.out.println(i);
		}
		
		Map<String, Double> treeMap = new TreeMap<String, Double>(new Comparator<String>() {
			@Override
			public int compare(String o1, String o2) {
				Double d1 = m.get(o1);
				Double d2 = m.get(o2);
				return d1.compareTo(d2);
			}
		});
		treeMap.putAll(m);
		
		String[] values = treeMap.keySet().toArray(new String[0]);
//		System.out.println(Arrays.toString(values));
//		for (int i = 0; i < values.length; i++) {
//			String value = values[i];
//			if (value.equals("3/7")) {
//				System.out.println(values[i - 1]);
//				break;
//			}
//		}
	}
}
